package org.biblicalcontent.ui.generiek.models;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

public abstract class AbstractPresentationModel {

	private PropertyChangeSupport support = new PropertyChangeSupport(this);

	public AbstractPresentationModel() {

	}

	public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
		support.addPropertyChangeListener(propertyName, listener);
	}

	public void addPropertyChangeListener(PropertyChangeListener listener) {
		support.addPropertyChangeListener(listener);
	}

	public void removePropertyChangeListener(PropertyChangeListener listener) {
		support.removePropertyChangeListener(listener);
	}

	public <T> void firePropertyChange(String propName, T oldValue, T newValue) {
		support.firePropertyChange(propName, oldValue, newValue);
	}
}
